#include "MainHeader.h"
cToolset::~cToolset(){}
cToolset::cToolset(){ }
int cToolset::Init(HWND setup){
hwndBound=setup;
    Tile=0;
    InitTileset(setup);

return 0;
}
int cToolset::Resize(){

	RECT scroll;
	RECT Bound;
	int newmax=0;
	GetWindowRect(hwndMain, &Bound);
	scroll.top=190;
	scroll.left=Bound.right-48;
	scroll.bottom=(Bound.bottom) - (scroll.top)-64;
	scroll.right = 16;
	//Now we resize the values in the  scroll
    newmax=clsGame.TSA.max/16;
	MoveWindow(hwndTileset,scroll.left-288, scroll.top, 256,scroll.bottom, 0);
	newmax=((scroll.bottom/16)<newmax? newmax-scroll.bottom/16:0); 
	vScroll.maxscroll = newmax;
	//vScroll.Change();
	SetScrollRange( vScroll.me, SB_CTL, 0, vScroll.maxscroll, FALSE);
	MoveWindow(GetDlgItem(hwndMain,IDC_VSCROLLTILESET),scroll.left, scroll.top, scroll.right, scroll.bottom,0);
	return 0; 




}